<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#DBE1E5">
	<tr>
		<td width="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		<td height="25" class="defaultFormLabel">{t t=$el.name}</td>		
	</tr>
</table>
<table width="100%" border="0" bgcolor="#DBE1E5" cellpadding="0" cellspacing="0">
  <tr>
    <td style="padding:0px 3px 0px 15px">
    	{ext->get_field_value assign="value" name=$el.name parent=$data.page.id}
		{ext->clear_string assign="str" array=$value}
			{if $_var.editor.gzip == 1}
			<script type="text/javascript">
			tinyMCE_GZ.init({ldelim}
				plugins : 'advimage,file,flash,advlink,preview,searchreplace,contextmenu,paste,style',
				themes : 'big',
				languages : '{if $smarty.cookies.interface_lang=="lt"}lt{else}en{/if}',
				disk_cache : true,
				debug : false
			{rdelim});
			</script>
			<!-- Needs to be seperate script tags! -->
			{/if}
			<script type="text/javascript">
			tinyMCE.init({ldelim}
				language : "{if $smarty.cookies.interface_lang=="lt"}lt{else}en{/if}",
				mode : "exact",
				theme : "big",
				elements : "{$el.name}",
				plugins : "advimage,file,flash,advlink,preview,searchreplace,contextmenu,paste,style",
				theme_advanced_buttons1 : "undo,redo,separator,preview,separator,cut,copy,paste,pasteword,search,replace,separator,link,unlink,separator,image,file,flash",
				theme_advanced_buttons2 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,sub,sup,separator,bullist,numlist,separator,outdent,indent,separator,cleanup",
				theme_advanced_buttons3 : "{if $editors_advance.styles.plugin}{$editors_advance.styles.plugin}{/if}",
				theme_advanced_toolbar_location : "top",
				theme_advanced_toolbar_align : "left",
				theme_advanced_statusbar_location : "bottom",
				paste_use_dialog : false,
				theme_advanced_resizing : false,
				theme_advanced_resize_horizontal : false,
				paste_auto_cleanup_on_paste : true,
				paste_convert_headers_to_strong : false,
				paste_strip_class_attributes : "all",
				paste_remove_spans : false,
				paste_remove_styles : false,
				tvs_parent : "{$data.page.id}",
				tvs_tpl_parent_name : "{$data.page.name|urlencode}",
				tvs_field : "text{$el.id}",
				button_tile_map : true
			{rdelim});
			
			function toggleEditor(id, cmd) {ldelim}
				var elm = document.getElementById(id);
				if (cmd == 'mceAddControl'){ldelim}
					if (tinyMCE.getInstanceById(id) == null) tinyMCE.execCommand(cmd, false, id);
				{rdelim}else{ldelim}
					tinyMCE.execCommand(cmd, false, id);
				{rdelim}
			{rdelim}
		</script>
  		<textarea id="{$el.name}" name="{$el.name}" class="defaultInputTextarea" style="height:150px;" width="100%">{$value|escape:"html"}</textarea>
    </td>
  </tr>
  <tr>
    <td align="right">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td width="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>	
			<td bgcolor="#B3C3CD" height="25" style="padding:0px 10px 0px 10px"><a href="javascript:void(0);" onClick="toggleEditor('{$el.name}', 'mceAddControl'); return false;">WYSIWYG</a></td>	
			<td width="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>	
			<td bgcolor="#B3C3CD" height="25" style="padding:0px 10px 0px 10px"><a href="javascript:void(0);" onClick="toggleEditor('{$el.name}', 'mceRemoveControl'); return false;">HTML</a></td>
			<td width="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			<td width="23"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="10" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>